﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace TravelSite.Entities
{
    public class Contact
    {
        public int ContactId { get; set; }
        public int AgentId { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Address1 { get; set; }
        public string Address2 { get; set; }
        public string City { get; set; }
        public int CountryId { get; set; }
        public int? StateId { get; set; }
        public string Zip { get; set; }
        public string Email { get; set; }
        public string MPhone { get; set; }
        public string WPhone { get; set; }
        public string HPhone { get; set; }
        public string CompanyName { get; set; }
        public string JobTitle { get; set; }

        public string StateCode { get; set; }
        public string AgentName { get; set; }

        public string PartnerFirstName { get; set; }
        public string PartnerLastName { get; set; }
        public DateTime? DateOfBirth { get; set; }
        public string Notes { get; set; }

        public string FullName
        {
            get
            {
                return FirstName + " " + LastName;
            }
        }
        public string Pin { get; set; }

        public DateTime? SalesFormDate { get; set; }
	    public string SalesFormList { get; set; }
	    public string SalesFormEmailed { get; set; }
	    public string SalesFormOpener { get; set; }
	    public string SalesFormCloser { get; set; }
	
	    public decimal? SalesFormManagerPrice { get; set; }
	    public decimal? SalesFormProcessingFee { get; set; }
	    public decimal? SalesFormTotal { get; set; }
	
	    public string SalesFormMarriedType { get; set; }
	    public bool SalesFormCoHabMatchingIds { get; set; }
	    public string SalesFormSingleGender { get; set; }
        public bool SalesFormSingleOwnTimeshare { get; set; }
        public string SalesFormSingleOwnTimeshareName { get; set; }
	
	    public decimal? SalesFormIncome { get; set; }
	    public int? SalesFormAge { get; set; }
	
	    /*public string SalesFormGuestFirstName { get; set; }
	    public string SalesFormGuestLastName { get; set; }
	    public DateTime? SalesFormGuestDOB { get; set; }*/
	
	    public DateTime? SalesFormSpouseDOB { get; set; }
		
	    public string SalesFormBillingAddress { get; set; }
	
	    public bool SalesFormMajorCreditCard { get; set; }
	    public string SalesFormNameOnCard { get; set; }
	    public DateTime? SalesFormCardExp { get; set; }
	    public string SalesFormCardNo { get; set; }
	    public string SalesFormCardCVV { get; set; }
	    public string SalesFormCardType { get; set; }
	
	    public bool SalesFormDestinationLasVegas { get; set; }
	    public bool SalesFormDestinationOpen { get; set; }
	    public bool SalesFormDestination4days3nights { get; set; }
	    public bool SalesFormDestination3days2nights { get; set; }
	
	    public bool SalesFormGiftsDinner { get; set; }
	    public bool SalesFormGifts100 { get; set; }
	    public bool SalesFormGiftsCompTix { get; set; }
	
	    public bool SalesFormBonusVacationLand { get; set; }
	    public bool SalesFormBonusVacationCondo { get; set; }
	    public bool SalesFormBonusVacationBahamas { get; set; }
	
	    public bool SalesFormOwnTimeshare { get; set; }
	    public string SalesFormOwnTimeshareName { get; set; }
	    public string SalesFormOwnTimeshareTotalTix { get; set; }
	    public string SalesFormOwnTimeshareNotes { get; set; }
	
	    public string SalesFormVerifiedBy { get; set; }
	    public string SalesFormMerchant { get; set; } 
	    public string SalesFormConfirmation { get; set; }
	    public string SalesFormCCAuth { get; set; }
        public string SalesFormTime { get; set; }

        public string SalesFormBonus1 { get; set; }
        public string SalesFormBonus2 { get; set; }
        public string SalesFormBonus3 { get; set; }
        
        public bool CanDelete { get; set; }

        public string Gift1 { get; set; }
        public string Gift2 { get; set; }
        public string Gift3 { get; set; }
        public string Gift4 { get; set; }
        public string Gift5 { get; set; }
        public string Gift6 { get; set; }
        public string Gift7 { get; set; }
        public string Gift8 { get; set; }

        public DateTime? SalesFormUpdatedAt { get; set; }

        public DateTime? BankInfoDate { get; set; }
        public decimal? BankInfoAmount { get; set; }
        public int? BankInfoPaymentId { get; set; }
        public int? VacationCompanyId { get; set; }

        public string TourDate { get; set; }
        public DateTime? TourDateDate 
        {
            get
            {
                DateTime? result = null;
                DateTime value;
                if (DateTime.TryParseExact(TourDate, "d", new CultureInfo("en-US"), DateTimeStyles.None, out value))
                    result = value;
                return result;
            }
        }
        public string TourTime { get; set; }
        public int? TourCompanyId { get; set; }
        public int? TourHotelId { get; set; }
        public decimal? TourHotelCost { get; set; }
        public string TourNotes { get; set; }
        public string Verified { get; set; }
        public string VerificationsSend { get; set; }
        public string ConfirmationNumber { get; set; }
        public int? UpgradeFee { get; set; }
        public string Gift { get; set; }
        public int? GiftCost { get; set; }
        public string Comments { get; set; }

        public int? WholesalerId { get; set; }
        public string HotelbedsInvoiceNumber { get; set; }
        public string HotelbedsResNumber { get; set; }
        public DateTime? HotelbedsBookedDate { get; set; }
        public DateTime? HotelbedsArrivalDate { get; set; }
        public DateTime? HotelbedsDepartureDate { get; set; }
        public DateTime? HotelbedsPaymentDate { get; set; }
        public string HotelbedsClient { get; set; }
        public decimal? HotelbedsTotalWholesaleCost { get; set; }
        public DateTime? HotelbedsExpoPaidDate { get; set; }
        public decimal? HotelbedsTotalPaid { get; set; }
        public string HotelbedsCheckNumber { get; set; }
        public DateTime? HotelbedsHBPaidDate { get; set; }

        public int? EmailSettingId { get; set; }

        public decimal? PackagePrice { get; set; }

        public string PaymentName { get; set; }
        public string VacationCompanyName { get; set; }
        public string TourName { get; set; }
        public string TourCompanyName { get; set; }
        public string WholesalerName { get; set; }

        public bool IsConfirmed
        {
            get
            {
                return TourDateDate.HasValue && !string.IsNullOrEmpty(TourTime) && !string.IsNullOrEmpty(Verified) && !Verified.ToLower().Contains("canceled");
            }
        }

        public bool IsCanceled
        {
            get
            {
                return TourDateDate.HasValue && !string.IsNullOrEmpty(TourTime) && !string.IsNullOrEmpty(Verified) && Verified.ToLower().Contains("canceled");
            }
        }

        public bool IsPending
        {
            get
            {
                return TourDateDate.HasValue && !string.IsNullOrEmpty(TourTime) && string.IsNullOrEmpty(Verified);
            }
        }
    }

    public class ContactComment
    {
        public int ContactCommentId { get; set; }
        public int ContactId { get; set; }
        public int? UserId { get; set; }
        public string Comment { get; set; }
        public DateTime? AddDateTime { get; set; }
        public string UserName { get; set; }
    }

    public class ContactColumn
    {
        public string ContactColumnName { get; set; }
        public string ContactColumnFriendlyName { get; set; }
    }

    public class Alphabet
    {
        public string Value { get; set; }
        public bool Selected { get; set; }
    }

    public class State
    {
        public int StateId { get; set; }
        public string StateName { get; set; }
        public string StateCode { get; set; }
    }

    public class Country
    {
        public int CountryId { get; set; }
        public string CountryName { get; set; }
    }
}
